package com.example.myapplication.fragment;

import androidx.appcompat.app.AppCompatActivity;
import androidx.fragment.app.FragmentTransaction;

import android.os.Bundle;
import android.util.Log;
import android.view.View;
import android.widget.TextView;

import com.example.myapplication.R;

public class FragementActivity extends AppCompatActivity implements View.OnClickListener, FragmentFA.MyListener {

    private TextView view;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_fragement);
        view = findViewById(R.id.rel_btn3);
        findViewById(R.id.tv_adv1).setOnClickListener(this);
    }

    @Override
    public void onClick(View v) {
        view.setText("");
    }

    public void sendValue(String value) {
        view.setText(value);
        Log.e("fragment传来的数据为：",value);
    }
}